<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<script type="text/javascript">
	function search() {
		var i = $('#ss1').val();
		location = "CategoryServlet?flag=from&cate_key=" + i;
	}
</script>
<div class="tab-header">

	<div class="inner">
		<div class="pull-left">
			<div class="pull-left">
				欢迎来到: <span class="cr">天衣无缝</span>

			</div>

		</div>

		<div class="pull-right">

			<c:if test="${user!=null }">
					欢迎您：${user.urealname } &nbsp;&nbsp;&nbsp;
			</c:if>
			<c:if test="${user==null }">

				<a href="login.jsp"><span class="cr">登录</span></a>
				<a href="login.jsp?p=register">注册</a>
			</c:if>
			<a href="personal.jsp">个人中心</a>
		</div>
	</div>
</div>
<!-- 搜索栏 -->
<div class="top-search">
	<div class="inner">
		<a class="logo" href="toindexServlet"><img src="images/icons/logo.jpg"
			alt="XXX" class="cover"></a>
		<div class="search-box">
			<form class="input-group">
				<input placeholder="Ta们都在搜XXX" type="text" id="ss1"> <span
					class="input-group-btn">
					<button type="button" onclick="search()">
						<span class="glyphicon glyphicon-search" aria-hidden="true"></span>
					</button>
				</span>
			</form>
		</div>
		<div class="cart-box">

			<c:if test="${user==null}">
				<a href="shopcart.jsp" class="cart-but"> <i
					class="iconfont icon-shopcart cr fz16"></i> <span id="">购物车0
						件</span>
				</a>
			</c:if>
			<c:if test="${user!=null }">
				<a href="ShopCartServlet?flag=index" class="cart-but"> <i
					class="iconfont icon-shopcart cr fz16"></i> <span id="shopcart_num">购物车${shopnum }件</span>
				</a>
			</c:if>

		</div>
	</div>

</div>
<!-- 首页导航栏 -->
<div class="top-nav bg3">
	<div class="nav-box inner">
		<ul class="nva-list">
			<a href="index.jsp"><li>首页HOME</li></a>
			<a href="javascript:void(0)" onclik="deleteall()"><li>所有宝贝</li></a>
			<a href="index.jsp"><li>短袖T恤</li></a>
		</ul>
	</div>
</div>